PUBLIC = ../../public
SRC = src
BIN = bin
GLOBAL_BIN = ../../bin
CFLAGS = -Wall -pedantic -ansi -Werror
CC = gcc
LIB_TOOL = ar
LIB_FLAGS = -r -s
COMPILE_FLAG = -c

all: ListTestrelease 

ListTestdebug: CFLAGS+=-g 
ListTestdebug: BIN=bin/debug
ListTestdebug: GLOBAL_BIN=../../bin/debug
ListTestdebug: $(BIN)/ListTest clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"


ListTestrelease: CFLAGS+=-g -DNDEBUG
ListTestrelease: BIN=bin/release
ListTestrelease: GLOBAL_BIN=../../bin/release
ListTestrelease: $(BIN)/ListTest clean
	@echo "**********************************************************"
	@echo "*							*"
	@echo "*		SUCCEFULY FINISHED			*"
	@echo "*							*"
	@echo "**********************************************************"

$(BIN)/ListTest: ListTest.o
	$(CC) $(CFLAGS) ListTest.o -L$(GLOBAL_BIN) -lList -o $(BIN)/ListTest

ListTest.o: $(PUBLIC)/List.h ListTest.c
	$(CC) $(COMPILE_FLAG) $(CFLAGS) -I$(PUBLIC) ListTest.c -o ListTest.o

clean: 
	rm *.o
